package com.yuoj.yuojcodesandbox.model.enums;

import lombok.Getter;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

/**
 * @author 刘渠好
 * @since 2025/3/29 16:49
 * 下载镜像类型
 */
@Getter
public enum LanguageImageEnum {

    JAVA11("java11","openjdk:11"),
    JAVA8("java8","openjdk:8-alpine");

    private String language;

    private String image;

    LanguageImageEnum(String language, String image) {
        this.language = language;
        this.image = image;
    }

    //获取所有镜像类型
    public List<String> getList(){
        return Arrays.stream(values()).map(LanguageImageEnum::getImage).collect(Collectors.toList());
    }
}
